namespace Agro.Models {
        using System;
        using SN.Data;
        
        
        /// <summary>
        /// 表名：T_File 主键列：File_ID
        /// </summary>
        [SerializableAttribute()]
        public partial class T_File : Entity {
            
            protected Int32 _File_ID;
            
            protected String _File_Title;
            
            protected String _File_ServerName;
            
            protected String _File_Type;
            
            /// <summary>
            /// 文件ID
            /// </summary>
            public Int32 File_ID {
                get {
                    return this._File_ID;
                }
                set {
                    this.OnPropertyValueChange(_.File_ID, _File_ID, value);
                    this._File_ID = value;
                }
            }
            
            /// <summary>
            /// 文件标题
            /// </summary>
            public String File_Title {
                get {
                    return this._File_Title;
                }
                set {
                    this.OnPropertyValueChange(_.File_Title, _File_Title, value);
                    this._File_Title = value;
                }
            }
            
            /// <summary>
            /// 源文件名称
            /// </summary>
            public String File_ServerName {
                get {
                    return this._File_ServerName;
                }
                set {
                    this.OnPropertyValueChange(_.File_ServerName, _File_ServerName, value);
                    this._File_ServerName = value;
                }
            }
            
            /// <summary>
            /// 文件类型
            /// </summary>
            public String File_Type {
                get {
                    return this._File_Type;
                }
                set {
                    this.OnPropertyValueChange(_.File_Type, _File_Type, value);
                    this._File_Type = value;
                }
            }
            
            /// <summary>
            /// 获取实体对应的表名
            /// </summary>
            protected override Table GetTable() {
                return new Table<T_File>("T_File");
            }
            
            /// <summary>
            /// 获取实体中的标识列
            /// </summary>
            protected override Field GetIdentityField() {
                return _.File_ID;
            }
            
            /// <summary>
            /// 获取实体中的主键列
            /// </summary>
            protected override Field[] GetPrimaryKeyFields() {
                return new Field[] {
                        _.File_ID};
            }
            
            /// <summary>
            /// 获取列信息
            /// </summary>
            protected override Field[] GetFields() {
                return new Field[] {
                        _.File_ID,
                        _.File_Title,
                        _.File_ServerName,
                        _.File_Type};
            }
            
            /// <summary>
            /// 获取列数据
            /// </summary>
            protected override object[] GetValues() {
                return new object[] {
                        this._File_ID,
                        this._File_Title,
                        this._File_ServerName,
                        this._File_Type};
            }
            
            /// <summary>
            /// 给当前实体赋值
            /// </summary>
            protected override void SetValues(IRowReader reader) {
                if ((false == reader.IsDBNull(_.File_ID))) {
                    this._File_ID = reader.GetInt32(_.File_ID);
                }
                if ((false == reader.IsDBNull(_.File_Title))) {
                    this._File_Title = reader.GetString(_.File_Title);
                }
                if ((false == reader.IsDBNull(_.File_ServerName))) {
                    this._File_ServerName = reader.GetString(_.File_ServerName);
                }
                if ((false == reader.IsDBNull(_.File_Type))) {
                    this._File_Type = reader.GetString(_.File_Type);
                }
            }
            
            public override int GetHashCode() {
                return base.GetHashCode();
            }
            
            public override bool Equals(object obj) {
                if ((obj == null)) {
                    return false;
                }
                if ((false == typeof(T_File).IsAssignableFrom(obj.GetType()))) {
                    return false;
                }
                if ((((object)(this)) == ((object)(obj)))) {
                    return true;
                }
                return false;
            }
            
            public class _ {
                
                /// <summary>
                /// 表示选择所有列，与*等同
                /// </summary>
                public static AllField All = new AllField<T_File>();
                
                /// <summary>
                /// 文件ID - 字段名：File_ID - 数据类型：Int32
                /// </summary>
                public static Field File_ID = new Field<T_File>("File_ID");
                
                /// <summary>
                /// 文件标题 - 字段名：File_Title - 数据类型：String
                /// </summary>
                public static Field File_Title = new Field<T_File>("File_Title");
                
                /// <summary>
                /// 源文件名称 - 字段名：File_ServerName - 数据类型：String
                /// </summary>
                public static Field File_ServerName = new Field<T_File>("File_ServerName");
                
                /// <summary>
                /// 文件类型 - 字段名：File_Type - 数据类型：String
                /// </summary>
                public static Field File_Type = new Field<T_File>("File_Type");
            }
        }
    }
    